package com.summer.LanQiao;
//机器人判分系统要求必须如下规则：
// 1： 不能有package关键字
// 2： 类名必须是Main

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String orign = sc.nextLine();
        StringBuilder stringBuilder = new StringBuilder(orign);
        int index = -1;
        if (stringBuilder.reverse().toString().equals(orign)) System.out.println(orign);
        else {
            for (int i = 0,j=orign.length()-1; i < j&&j>=0; i++) {
                if (orign.charAt(i)==orign.charAt(j)){
                    int k = i+1;
                    int g = j-1;
                    boolean flag = true;
                    while (k<g&&g>=0){
                        if (orign.charAt(k)!=orign.charAt(g)){
                            flag = false;
                            break;
                        }
                        k++;
                        g--;
                    }
                    if (flag){
                        index = i;
                        break;
                    }
                }
            }
            if (index==-1) System.out.println(new StringBuilder(orign).substring(0,orign.length()-1)+stringBuilder);
            else if(index==0) System.out.println(orign);
            else {
                StringBuilder stringBuilder1 = new StringBuilder(orign);
                System.out.println(orign+new StringBuilder(stringBuilder1.substring(0,index)).reverse());
            }
        }
    }
}
